package com.woniu.woniuproject.service;

import com.woniu.woniuproject.mapper.Product_accountMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 功能描述:<br>
 * 〈〉
 *
 * @author EDZ
 * @create 2020/11/17
 * @since 1.0.0
 */
@Service
public class ProductAccountService {

    @Autowired
    Product_accountMapper product_accountMapper;


    /*查询所有购买官标产品的用户集合*/
    @Transactional
    public Map queryall(){
        HashMap<String, Object> map = new HashMap<>();
        List<Integer> list=new ArrayList<>();
        List<Double> list1=new ArrayList<>();
        list.add(product_accountMapper.queryone());
        list.add( product_accountMapper.querytwo());
        list.add( product_accountMapper.querythree());
        map.put("list",list);
        list1.add(product_accountMapper.queryonemoney());
        list1.add(product_accountMapper.querytwomoney());
        list1.add(product_accountMapper.querythreemoney());
        map.put("money",list1);
        return map;
    }



}